Dynamically defining a voicexml grammar in an x+v page of a multimodal application

ABSTRACT

Dynamically defining a VoiceXML grammar of a multimodal application, implemented with the multimodal application operating on a multimodal device supporting multiple modes of interaction including a voice mode and one or more non-voice modes, the multimodal application operatively coupled to a VoiceXML interpreter, and the method includes loading the X+V page by the multimodal application, from a web server into the multimodal device for execution, the X+V page including one or more VoiceXML grammars in one or more VoiceXML dialogs, including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application a grammar definition for the in-line grammar from the web server without reloading the X+V page; and defining by the multimodal application the in-line grammar with the retrieved grammar definition before executing the VoiceXML dialog containing the in-line grammar.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The field of the invention is data processing, or, more specifically, methods, apparatus, and products for dynamically defining a VoiceXML grammar in an X+V page.

2. Description of Related Art

User interaction with applications running on small devices through a keyboard or stylus has become increasingly limited and cumbersome as those devices have become increasingly smaller. In particular, small handheld devices like mobile phones and PDAs serve many functions and contain sufficient processing power to support user interaction through multimodal access, that is, by interaction in non-voice modes as well as voice mode. Devices which support multimodal access combine multiple user input modes or channels in the same interaction allowing a user to interact with the applications on the device simultaneously through multiple input modes or channels. The methods of input include speech recognition, keyboard, touch screen, stylus, mouse, handwriting, and others. Multimodal input often makes using a small device easier.

Multimodal applications are often formed by sets of markup documents served up by web servers for display on multimodal browsers. A ‘multimodal browser,’ as the term is used in this specification, generally means a web browser capable of receiving multimodal input and interacting with users with multimodal output, where modes of the multimodal input and output include at least a speech mode. Multimodal browsers typically render web pages written in XHTML+Voice (‘X+V’). X+V provides a markup language that enables users to interact with an multimodal application often running on a server through spoken dialog in addition to traditional means of input such as keyboard strokes and mouse pointer action. Visual markup tells a multimodal browser what the user interface is look like and how it is to behave when the user types, points, or clicks. Similarly, voice markup tells a multimodal browser what to do when the user speaks to it. For visual markup, the multimodal browser uses a graphics engine; for voice markup, the multimodal browser uses a speech engine. X+V adds spoken interaction to standard web content by integrating XHTML (eXtensible Hypertext Markup Language) and speech recognition vocabularies supported by VoiceXML. For visual markup, X+V includes the XHTML standard. For voice markup, X+V includes a subset of VoiceXML. For synchronizing the VoiceXML elements with corresponding visual interface elements, X+V uses events. XHTML includes voice modules that support speech synthesis, speech dialogs, command and control, and speech grammars. Voice handlers can be attached to XHTML elements and respond to specific events. Voice interaction features are integrated with XHTML and can consequently be used directly within XHTML content.

In addition to X+V, multimodal applications also may be implemented with Speech Application Tags (‘SALT’). SALT is a markup language developed by the Salt Forum. Both X+V and SALT are markup languages for creating applications that use voice input/speech recognition and voice output/speech synthesis. Both SALT applications and X+V applications use underlying speech recognition and synthesis technologies or ‘speech engines’ to do the work of recognizing and generating human speech. As markup languages, both X+V and SALT provide markup-based programming environments for using speech engines in an application's user interface. Both languages have language elements, markup tags, that specify what the speech-recognition engine should listen for and what the synthesis engine should ‘say.’ Whereas X+V combines XHTML, VoiceXML, and the XML Events standard to create multimodal applications, SALT does not provide a standard visual markup language or eventing model. Rather, it is a low-level set of tags for specifying voice interaction that can be embedded into other environments. In addition to X+V and SALT, multimodal applications may be implemented in Java with a Java speech framework, in C++, for example, and with other technologies and in other environments as well.

Current lightweight voice solutions require a developer to build a grammar and lexicon to limit the potential number of words that an automated speech recognition (‘ASR’) engine must recognize—as a means for increasing accuracy. Pervasive devices have limited interaction and input modalities due to the form factor of the device, and kiosk devices have limited interaction and input modalities by design. In both cases the use of speaker independent voice recognition is implemented to enhance the user experience and interaction with the device. The state of the art in speaker independent recognition allows for some sophisticated voice applications to be written as long as there is a limited vocabulary associated with each potential voice command. For example, if the user is prompted to speak the name of a city the system can, with a good level of confidence, recognize the name of the city spoken. Voice enabling multimodal applications, however, still remains computationally intensive, and providing dynamic changes among speech recognition grammars is still achieved primarily by reloading entire X+V pages.

SUMMARY OF THE INVENTION

Methods, apparatus, and computer program products are described for dynamically defining a VoiceXML grammar in an X+V page of a multimodal application, implemented with the multimodal application operating on a multimodal device supporting multiple modes of interaction including a voice mode and one or more non-voice modes, the multimodal application operatively coupled to a VoiceXML interpreter, including: loading the X+V page by the multimodal application, from a web server into the multimodal device for execution, the X+V page including one or more VoiceXML grammars in one or more VoiceXML dialogs, including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application a grammar definition for the in-line grammar from the web server without reloading the X+V page; and defining by the multimodal application the in-line grammar with the retrieved grammar definition before executing the VoiceXML dialog containing the in-line grammar.

The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular descriptions of exemplary embodiments of the invention as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts of exemplary embodiments of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 sets forth a network diagram illustrating an exemplary system for dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention.

FIG. 2 sets forth a block diagram of automated computing machinery comprising an example of a computer useful as a voice server in dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention.

FIG. 3 sets forth a functional block diagram of exemplary apparatus for dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention.

FIG. 4 sets forth a block diagram of automated computing machinery comprising an example of a computer useful as a multimodal device in dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention.

FIG. 5 sets forth a flow chart illustrating an exemplary method of dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention.

FIG. 6 sets forth a flow chart illustrating a further exemplary method of dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Exemplary methods, apparatus, and products for dynamically defining a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention are described with reference to the accompanying drawings, beginning with FIG. 1. FIG. 1 sets forth a network diagram illustrating an exemplary system for dynamically defining a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention. Dynamically defining a VoiceXML grammar in an X+V page in this example is implemented with a multimodal application (195) operating on a multimodal device (152). The multimodal application (195) is composed of one or more X+V pages. The multimodal device supports multiple modes of interaction including a voice mode and one or more non-voice modes of user interaction with the multimodal application. The voice mode is represented here with audio output of voice prompts and responses (177) from the multimodal devices and audio input of speech for recognition (315) from a user (128). Non-voice modes are represented by input/output devices such as keyboards and display screens on the multimodal devices (152). The multimodal application is operatively coupled (195) to a VoiceXML interpreter (149). The operative coupling may be implemented with an application programming interface (‘API’), a voice service module, or a VoIP connection as explained more detail below.

The system of FIG. 1 operates generally to dynamically define a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention by loading the X+V page (512) by the multimodal application (195), from a web server (147) into the multimodal device (107) for execution, where the X+V page includes one or more VoiceXML grammars in one or more VoiceXML dialogs, including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application (195) a grammar definition (513) for the in-line grammar from the web server (147) without reloading the X+V page; and defining by the multimodal application (195) the in-line grammar with the retrieved grammar definition before executing the VoiceXML dialog containing the in-line grammar.

As the term is used in this specification, an ‘in-line grammar’ is a grammar those whose definition is set forth within the grammar element. The following is an example of an in-line grammar:

<grammar type=“application/grammar” id=“exampleGrammar”>  vanilla | chocolate | strawberry </grammar>

By way of contrast for further explanation, an ‘external grammar’ is a grammar whose definition is outside the grammar element at a location identified by an ‘src’ attribute in the grammar element. The following is an example of an external grammar element:

<grammar type=“application/grammar” id=“exampleGrammar”  src=“someURL”> </grammar>

An ‘undefined in-line grammar,’ then, is an in-line grammar containing no grammar definition. The following is an example of an undefined in-line grammar:

<grammar type=“application/grammar” id=“exampleGrammar”> </grammar>

An undefined in-line grammar needs to be defined before it can be used for speech recognition.

A multimodal device is an automated device, that is, automated computing machinery or a computer program running on an automated device, that is capable of accepting from users more than one mode of input, keyboard, mouse, stylus, and so on, including speech input—and also displaying more than one mode of output, graphic, speech, and so on. A multimodal device is generally capable of accepting speech input from a user, digitizing the speech, and providing digitized speech to a speech engine for recognition. A multimodal device may be implemented, for example, as a voice-enabled browser on a laptop, a voice browser on a telephone handset, an online game implemented with Java on a personal computer, and with other combinations of hardware and software as may occur to those of skill in the art. Because multimodal applications may be implemented in markup languages (X+V, SALT), object-oriented languages (Java, C++), procedural languages (the C programming language), and in other kinds of computer languages as may occur to those of skill in the art, this specification uses the term ‘multimodal application’ to refer to any software application, server-oriented or client-oriented, thin client or thick client, that administers more than one mode of input and more than one mode of output, typically including visual and speech modes.

The system of FIG. 1 includes several example multimodal devices:

-   -   personal computer (107) which is coupled for data communications         to data communications network (100) through wireline connection         (120),     -   personal digital assistant (‘PDA’) (112) which is coupled for         data communications to data communications network (100) through         wireless connection (114),     -   mobile telephone (110) which is coupled for data communications         to data communications network (100) through wireless connection         (116), and     -   laptop computer (126) which is coupled for data communications         to data communications network (100) through wireless connection         (118).

Each of the example multimodal devices (152) in the system of FIG. 1 includes a microphone, an audio amplifier, a digital-to-analog converter, and a multimodal application capable of accepting from a user (128) speech for recognition (315), digitizing the speech, and providing the digitized speech to a speech engine for recognition. The speech may be digitized according to industry standard codecs, including but not limited to those used for Distributed Speech Recognition as such. Methods for ‘COding/DECoding’ speech are referred to as ‘codecs.’ The European Telecommunications Standards Institute (‘ETSI’) provides several codecs for encoding speech for use in DSR, including, for example, the ETSI ES 201 108 DSR Front-end Codec, the ETSI ES 202 050 Advanced DSR Front-end Codec, the ETSI ES 202 211 Extended DSR Front-end Codec, and the ETSI ES 202 212 Extended Advanced DSR Front-end Codec. In standards such as RFC3557 entitled

-   -   RTP Payload Format for European Telecommunications Standards         Institute (ETSI) European Standard ES 201 108 Distributed Speech         Recognition Encoding         and the Internet Draft entitled     -   RTP Payload Formats for European Telecommunications Standards         Institute (ETSI) European Standard ES 202 050, ES 202 211, and         ES 202 212 Distributed Speech Recognition Encoding,         the IETF provides standard RTP payload formats for various         codecs. It is useful to note, therefore, that there is no         limitation in the present invention regarding codecs, payload         formats, or packet structures. Speech for dynamically defining a         VoiceXML grammar in an X+V page according to embodiments of the         present invention may be encoded with any codec, including, for         example:     -   AMR (Adaptive Multi-Rate Speech coder)     -   ARDOR (Adaptive Rate-Distortion Optimized sound codeR),     -   Dolby Digital (A/52, AC3),     -   DTS (DTS Coherent Acoustics),     -   MP1 (MPEG audio layer-1),     -   MP2 (MPEG audio layer-2) Layer 2 audio codec (MPEG-1, MPEG-2 and         non-ISO MPEG-2.5),     -   MP3 (MPEG audio layer-3) Layer 3 audio codec (MPEG-1, MPEG-2 and         non-ISO MPEG-2.5),     -   Perceptual Audio Coding,     -   FS-1015 (LPC-10),     -   FS-1016 (CELP),     -   G.726 (ADPCM),     -   G.728 (LD-CELP),     -   G.729 (CS-ACELP),     -   GSM,     -   HILN (MPEG-4 Parametric audio coding), and     -   others as may occur to those of skill in the art.

As mentioned, a multimodal device according to embodiments of the present invention is capable of providing speech to a speech engine for recognition. A speech engine is a functional module, typically a software module, although it may include specialized hardware also, that does the work of recognizing and generating or ‘synthesizing’ human speech. The speech engine implements speech recognition by use of a further module referred to in this specification as a ASR engine, and the speech engine carries out speech synthesis by use of a further module referred to in this specification as a text-to-speech (‘TTS’) engine. As shown in FIG. 1, a speech engine (148) may be installed locally in the multimodal device (107) itself, or a speech engine (153) may be installed remotely with respect to the multimodal device, across a data communications network (100) in a voice server (151). A multimodal device that itself contains its own speech engine is said to implement a ‘thick multimodal client’ or ‘thick client,’ because the thick multimodal client device itself contains all the functionality needed to carry out speech recognition and speech synthesis—through API calls to speech recognition and speech synthesis modules in the multimodal device itself with no need to send requests for speech recognition across a network and no need to receive synthesized speech across a network from a remote voice server. A multimodal device that does not contain its own speech engine is said to implement a ‘thin multimodal client’ or simply a ‘thin client,’ because the thin multimodal client itself contains only a relatively thin layer of multimodal application software that obtains speech recognition and speech synthesis services from a voice server located remotely across a network from the thin client. For ease of explanation, only one (107) of the multimodal devices (152) in the system of FIG. 1 is shown with a speech engine (148), but readers will recognize that any multimodal device may have a speech engine according to embodiments of the present invention.

A multimodal application (195) in this example provides speech for recognition and text for speech synthesis to a speech engine through a VoiceXML interpreter (149, 155). A VoiceXML interpreter is a software module of computer program instructions that accepts voice dialog instructions from a multimodal application, typically in the form of a VoiceXML <form> element. The voice dialog instructions include one or more grammars, data input elements, event handlers, and so on, that advise the VoiceXML interpreter how to administer voice input from a user and voice prompts and responses to be presented to a user, including vocal help prompts. The VoiceXML interpreter administers such dialogs by processing the dialog instructions sequentially in accordance with a VoiceXML Form Interpretation Algorithm (‘FIA’).

As shown in FIG. 1, a VoiceXML interpreter (149) may be installed locally in the multimodal device (107) itself, or a VoiceXML interpreter (155) may be installed remotely with respect to the multimodal device, across a data communications network (100) in a voice server (151). In a thick client architecture, a multimodal device (152) includes both its own speech engine (148) and its own VoiceXML interpreter (149). The VoiceXML interpreter (149) exposes an API to the multimodal application (195) for use in providing speech recognition and speech synthesis for the multimodal application. The multimodal application provides dialog instructions, VoiceXML <form> elements, grammars, input elements, event handlers, and so on, through the API to the VoiceXML interpreter, and the VoiceXML interpreter administers the speech engine on behalf of the multimodal application. In the thick client architecture, VoiceXML dialogs are interpreted by a VoiceXML interpreter on the multimodal device. In the thin client architecture, VoiceXML dialogs are interpreted by a VoiceXML interpreter on a voice server (151) located remotely across a data communications network (100) from the multimodal device running the multimodal application (195).

The VoiceXML interpreter provides grammars, speech for recognition, and text prompts for speech synthesis to the speech engine, and the VoiceXML interpreter returns to the multimodal application speech engine output in the form of recognized speech, semantic interpretation results, and digitized speech for voice prompts. In a thin client architecture, the VoiceXML interpreter (155) is located remotely from the multimodal client device in a voice server (151), the API for the VoiceXML interpreter is still implemented in the multimodal device, with the API modified to communicate voice dialog instructions, speech for recognition, and text and voice prompts to and from the VoiceXML interpreter on the voice server. For ease of explanation, only one (107) of the multimodal devices (152) in the system of FIG. 1 is shown with a VoiceXML interpreter (149), but readers will recognize that any multimodal device may have a VoiceXML interpreter according to embodiments of the present invention. Each of the example multimodal devices (152) in the system of FIG. 1 may be configured to dynamically define a VoiceXML grammar in an X+V page by installing and running on the multimodal device a multimodal application that dynamically defines a VoiceXML grammar in an X+V page according to embodiments of the present invention.

The use of these four example multimodal devices (152) is for explanation only, not for limitation of the invention. Any automated computing machinery capable of accepting speech from a user, providing the speech digitized to an ASR engine through a VoiceXML interpreter, and receiving and playing speech prompts and responses from the VoiceXML interpreter may be improved to function as a multimodal device for dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention.

The system of FIG. 1 also includes a voice server (151) which is connected to data communications network (100) through wireline connection (122). The voice server (151) is a computer that runs a speech engine (153) that provides voice recognition services for multimodal devices by accepting requests for speech recognition and returning text representing recognized speech. Voice server (151) also provides speech synthesis, text to speech (‘TTS’) conversion, for voice prompts and voice responses (314) to user input in multimodal applications such as, for example, X+V applications, SALT applications, or Java voice applications.

The system of FIG. 1 includes a data communications network (100) that connects the multimodal devices (152) and the voice server (151) for data communications. A data communications network for dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention is a data communications data communications network composed of a plurality of computers that function as data communications routers connected for data communications with packet switching protocols. Such a data communications network may be implemented with optical connections, wireline connections, or with wireless connections. Such a data communications network may include intranets, internets, local area data communications networks (‘LANs’), and wide area data communications networks (‘WANs’). Such a data communications network may implement, for example:

-   -   a link layer with the Ethernet™ Protocol or the Wireless         Ethernet™ Protocol,     -   a data communications network layer with the Internet Protocol         (‘IP’),     -   a transport layer with the Transmission Control Protocol (‘TCP’)         or the User Datagram Protocol (‘UDP’),     -   an application layer with the HyperText Transfer Protocol         (‘HTTP’), the Session Initiation Protocol (‘SIP’), the Real Time         Protocol (‘RTP’), the Distributed Multimodal Synchronization         Protocol (‘DMSP’), the Wireless Access Protocol (‘WAP’), the         Handheld Device Transfer Protocol (‘HDTP’), the ITU protocol         known as H.323, and     -   other protocols as will occur to those of skill in the art.

The system of FIG. 1 includes a web server (147) connected for data communications through wireline connection (123) to network (100) and therefore to the multimodal devices (152). The web server (147) may be any server that provides to client devices markup documents that compose multimodal applications. The web server (147) typically provides such markup documents via a data communications protocol, HTTP, HDTP, WAP, or the like. That is, although the term ‘web’ is used to described the web server generally in this specification, there is no limitation of data communications between multimodal devices and the web server to HTTP alone. The markup documents also may be implemented in any markup language that supports non-speech display elements, data entry elements, and speech elements for identifying which speech to recognize and which words to speak, grammars, form elements, and the like, including, for example, X+V and SALT. A multimodal application in a multimodal device then, upon receiving from the web sever (147) a markup document as part of a multimodal application, may execute speech elements by use of a VoiceXML interpreter (149) and speech engine (148) in the multimodal device itself or by use of a VoiceXML interpreter (155) and speech engine (153) located remotely from the multimodal device in a voice server (151).

The arrangement of the multimodal devices (152), the web server (147), the voice server (151), and the data communications network (100) making up the exemplary system illustrated in FIG. 1 are for explanation, not for limitation. Data processing systems useful for dynamically defining a VoiceXML grammar in an X+V page according to various embodiments of the present invention may include additional servers, routers, other devices, and peer-to-peer architectures, not shown in FIG. 1, as will occur to those of skill in the art. Data communications networks in such data processing systems may support many data communications protocols in addition to those noted above. Various embodiments of the present invention may be implemented on a variety of hardware platforms in addition to those illustrated in FIG. 1.

Dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention in a thin client architecture may be implemented with one or more voice servers, computers, that is, automated computing machinery, that provide speech recognition and speech synthesis. For further explanation, therefore, FIG. 2 sets forth a block diagram of automated computing machinery comprising an example of a computer useful as a voice server (151) in dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention. The voice server (151) of FIG. 2 includes at least one computer processor (156) or ‘CPU’ as well as random access memory (168) (‘RAM’) which is connected through a high speed memory bus (166) and bus adapter (158) to processor (156) and to other components of the voice server.

Stored in RAM (168) is a voice server application (188), a module of computer program instructions capable of operating a voice server in a system that is configured to dynamically define a VoiceXML grammar in an X+V page according to embodiments of the present invention. Voice server application (188) provides voice recognition services for multimodal devices by accepting requests for speech recognition and returning speech recognition results, including text representing recognized speech, text for use as variable values in dialogs, and text as string representations of scripts for semantic interpretation. Voice server application (188) also includes computer program instructions that provide text-to-speech (‘TTS’) conversion for voice prompts and voice responses to user input in multimodal applications such as, for example, X+V applications, SALT applications, or Java Speech applications.

Voice server application (188) may be implemented as a web server, implemented in Java, C++, or another language, that supports X+V, SALT, VoiceXML, or other multimodal languages, by providing responses to HTTP requests from X+V clients, SALT clients, Java Speech clients, or other multimodal clients. Voice server application (188) may, for a further example, be implemented as a Java server that runs on a Java Virtual Machine (102) and supports a Java voice framework by providing responses to HTTP requests from Java client applications running on multimodal devices. And voice server applications that support dynamically defining a VoiceXML grammar in an X+V page may be implemented in other ways as may occur to those of skill in the art, and all such ways are well within the scope of the present invention.

The voice server (151) in this example includes a speech engine (153). The speech engine is a functional module, typically a software module, although it may include specialized hardware also, that does the work of recognizing and generating human speech. The speech engine (153) includes an automated speech recognition (‘ASR’) engine for speech recognition and a text-to-speech (‘TTS’) engine for generating speech. The speech engine also includes a grammar (104), a lexicon (106), and a language-specific acoustic model (108). The language-specific acoustic model (108) is a data structure, a table or database, for example, that associates SFVs with phonemes representing, to the extent that it is practically feasible to do so, all pronunciations of all the words in a human language. The lexicon (106) is an association of words in text form with phonemes representing pronunciations of each word; the lexicon effectively identifies words that are capable of recognition by an ASR engine. Also stored in RAM (168) is a Text To Speech (‘TTS’) Engine (194), a module of computer program instructions that accepts text as input and returns the same text in the form of digitally encoded speech, for use in providing speech as prompts for and responses to users of multimodal systems.

The grammar (104) communicates to the ASR engine (150) the words and sequences of words that currently may be recognized. For precise understanding, distinguish the purpose of the grammar and the purpose of the lexicon. The lexicon associates with phonemes all the words that the ASR engine can recognize. The grammar communicates the words currently eligible for recognition. The set of words currently eligible for recognition and the set of words capable of recognition may or may not be the same.

Grammars for use in dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention may be expressed in any format supported by any ASR engine, including, for example, the Java Speech Grammar Format (‘JSGF’), the format of the W3C Speech Recognition Grammar Specification (‘SRGS’), the Augmented Backus-Naur Format (‘ABNF’) from the IETF's RFC2234, in the form of a stochastic grammar as described in the W3C's Stochastic Language Models (N-Gram) Specification, and in other grammar formats as may occur to those of skill in the art. Grammars typically operate as elements of dialogs, such as, for example, a VoiceXML <menu> or an X+V<form>. A grammar's definition may be expressed in-line in a dialog. Or the grammar may be implemented externally in a separate grammar document and referenced from with a dialog with a URI. Here is an example of a grammar expressed in JSFG:

<grammar scope=“dialog” ><![CDATA[  #JSGF V1.0;  grammar command;  <command> = [remind me to] call | phone | telephone <name>  <when>;  <name> = bob | martha | joe | pete | chris | john | artoush;  <when> = today | this afternoon | tomorrow | next week;  ]]> </grammar>

In this example, the elements named <command>, <name>, and <when> are rules of the grammar. Rules are a combination of a rulename and an expansion of a rule that advises an ASR engine or a voice interpreter which words presently can be recognized. In this example, expansion includes conjunction and disjunction, and the vertical bars ‘|’ mean ‘or.’ An ASR engine or a voice interpreter processes the rules in sequence, first <command>, then <name>, then <when>. The <command> rule accepts for recognition ‘call’ or ‘phone’ or ‘telephone’ plus, that is, in conjunction with, whatever is returned from the <name> rule and the <when> rule. The <name> rule accepts ‘bob’ or ‘martha’ or ‘joe’ or ‘pete’ or ‘chris’ or ‘john’ or ‘artoush’, and the <when> rule accepts ‘today’ or ‘this afternoon’ or ‘tomorrow’ or ‘next week.’ The command grammar as a whole matches utterances like these, for example:

-   -   “phone bob next week,”     -   “telephone martha this afternoon,”     -   “remind me to call chris tomorrow,” and     -   “remind me to phone pete today.”

The voice server application (188) in this example is configured to receive, from a multimodal client located remotely across a network from the voice server, digitized speech for recognition from a user and pass the speech along to the ASR engine (150) for recognition. ASR engine (150) is a module of computer program instructions, also stored in RAM in this example. In carrying out automated speech recognition, the ASR engine receives speech for recognition in the form of at least one digitized word and uses frequency components of the digitized word to derive a Speech Feature Vector (‘SFV’). An SFV may be defined, for example, by the first twelve or thirteen Fourier or frequency domain components of a sample of digitized speech. The ASR engine can use the SFV to infer phonemes for the word from the language-specific acoustic model (108). The ASR engine then uses the phonemes to find the word in the lexicon (106).

Also stored in RAM is a VoiceXML interpreter (192), a module of computer program instructions that processes VoiceXML grammars. VoiceXML input to VoiceXML interpreter (192) may originate, for example, from VoiceXML clients running remotely on multimodal devices, from X+V clients running remotely on multimodal devices, from SALT clients running on multimodal devices, or from Java client applications running remotely on multimedia devices. In this example, VoiceXML interpreter (192) interprets and executes VoiceXML segments representing voice dialog instructions received from remote multimedia devices and provided to VoiceXML interpreter (192) through voice server application (188).

A multimodal application (195) in a thin client architecture may provide voice dialog instructions, VoiceXML segments, VoiceXML <form> elements, and the like, to VoiceXML interpreter (149) through data communications across a network with multimodal application (195). The voice dialog instructions include one or more grammars, data input elements, event handlers, and so on, that advise the VoiceXML interpreter how to administer voice input from a user and voice prompts and responses to be presented to a user, including vocal help prompts. The VoiceXML interpreter administers such dialogs by processing the dialog instructions sequentially in accordance with a VoiceXML Form Interpretation Algorithm (‘FIA’) (193). In this example, the VoiceXML interpreter contains a VoiceXML dialog (522), where the dialog has been provided to the VoiceXML interpreter by a multimodal application to be interpreted by the VoiceXML interpreter.

Also stored in RAM (168) is an operating system (154). Operating systems useful in voice servers according to embodiments of the present invention include UNIX™, Linux™, Microsoft NT™, AIX™, IBM's i5/OS™, and others as will occur to those of skill in the art. Operating system (154), voice server application (188), VoiceXML interpreter (192), ASR engine (150), JVM (102), and TTS Engine (194) in the example of FIG. 2 are shown in RAM (168), but many components of such software typically are stored in non-volatile memory also, for example, on a disk drive (170).

Voice server (151) of FIG. 2 includes bus adapter (158), a computer hardware component that contains drive electronics for high speed buses, the front side bus (162), the video bus (164), and the memory bus (166), as well as drive electronics for the slower expansion bus (160). Examples of bus adapters useful in voice servers according to embodiments of the present invention include the Intel Northbridge, the Intel Memory Controller Hub, the Intel Southbridge, and the Intel I/O Controller Hub. Examples of expansion buses useful in voice servers according to embodiments of the present invention include Industry Standard Architecture (‘ISA’) buses and Peripheral Component Interconnect (‘PCI’) buses.

Voice server (151) of FIG. 2 includes disk drive adapter (172) coupled through expansion bus (160) and bus adapter (158) to processor (156) and other components of the voice server (151). Disk drive adapter (172) connects non-volatile data storage to the voice server (151) in the form of disk drive (170). Disk drive adapters useful in voice servers include Integrated Drive Electronics (‘IDE’) adapters, Small Computer System Interface (‘SCSI’) adapters, and others as will occur to those of skill in the art. In addition, non-volatile computer memory may be implemented for a voice server as an optical disk drive, electrically erasable programmable read-only memory (so-called ‘EEPROM’ or ‘Flash’ memory), RAM drives, and so on, as will occur to those of skill in the art.

The example voice server of FIG. 2 includes one or more input/output (‘I/O’) adapters (178). I/O adapters in voice servers implement user-oriented input/output through, for example, software drivers and computer hardware for controlling output to display devices such as computer display screens, as well as user input from user input devices (181) such as keyboards and mice. The example voice server of FIG. 2 includes a video adapter (209), which is an example of an I/O adapter specially designed for graphic output to a display device (180) such as a display screen or computer monitor. Video adapter (209) is connected to processor (156) through a high speed video bus (164), bus adapter (158), and the front side bus (162), which is also a high speed bus.

The exemplary voice server (151) of FIG. 2 includes a communications adapter (167) for data communications with other computers (182) and for data communications with a data communications network (100). Such data communications may be carried out serially through RS-232 connections, through external buses such as a Universal Serial Bus (‘USB’), through data communications data communications networks such as IP data communications networks, and in other ways as will occur to those of skill in the art. Communications adapters implement the hardware level of data communications through which one computer sends data communications to another computer, directly or through a data communications network. Examples of communications adapters useful for dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention include modems for wired dial-up communications, Ethernet (IEEE 802.3) adapters for wired data communications network communications, and 802.11 adapters for wireless data communications network communications.

For further explanation, FIG. 3 sets forth a functional block diagram of exemplary apparatus for dynamically defining a VoiceXML grammar in an X+V page in a thin client architecture according to embodiments of the present invention. The example of FIG. 3 includes a multimodal device (152) and a voice server (151) connected for data communication by a VoIP connection (216) through a data communications network (100). A multimodal application (195) runs on the multimodal device (152), and a voice server application (188) runs on the voice server (151). The multimodal client application (195) may be a set or sequence of X+V or SALT documents that execute on multimodal browser (196), a Java voice application that executes on the Java Virtual Machine (101), or a multimodal application implemented in other technologies as may occur to those of skill in the art. The example multimodal device of FIG. 3 also includes a sound card (174), which is an example of an I/O adapter specially designed for accepting analog audio signals from a microphone (176) and converting the audio analog signals to digital form for further processing by a codec (183).

In addition to the multimodal sever application (188), the voice server (151) also has installed upon it a speech engine (153) with an ASR engine (150), a grammar (104), a lexicon (106), a language-specific acoustic model (108), and a TTS engine (194), as well as a JVM (102), and a Voice XML interpreter (192). VoiceXML interpreter (192) interprets and executes VoiceXML dialog instructions received from the multimodal application and provided to VoiceXML interpreter (192) through voice server application (188). VoiceXML input to VoiceXML interpreter (192) may originate from the multimodal application (195) implemented as an X+V client running remotely on the multimodal device (152). As noted above, the multimedia device application (195) also may be implemented as a Java client application running remotely on the multimedia device (152), a SALT application running remotely on the multimedia device (152), and in other ways as may occur to those of skill in the art.

VoIP stands for ‘Voice Over Internet Protocol,’ a generic term for routing speech over an IP-based data communications network. The speech data flows over a general-purpose packet-switched data communications network, instead of traditional dedicated, circuit-switched voice transmission lines. Protocols used to carry voice signals over the IP data communications network are commonly referred to as ‘Voice over IP’ or ‘VoIP’ protocols. VoIP traffic may be deployed on any IP data communications network, including data communications networks lacking a connection to the rest of the Internet, for instance on a private building-wide local area data communications network or ‘LAN.’

Many protocols are used to effect VoIP. The two most popular types of VoIP are effected with the IETF's Session Initiation Protocol (‘SIP’) and the ITU's protocol known as ‘H.323.’ SIP clients use TCP and UDP port 5060 to connect to SIP servers. SIP itself is used to set up and tear down calls for speech transmission. VoIP with SIP then uses RTP for transmitting the actual encoded speech. Similarly, H.323 is an umbrella recommendation from the standards branch of the International Telecommunications Union that defines protocols to provide audio-visual communication sessions on any packet data communications network.

The apparatus of FIG. 3 operates in a manner that is similar to the operation of the system of FIG. 2 described above. Multimodal application (195) is a user-level, multimodal, client-side computer program that presents a voice interface to user (128), provides audio prompts and responses (314) and accepts input speech for recognition (315). Multimodal application (195) provides a speech interface through which a user may provide oral speech for recognition through microphone (176) and have the speech digitized through an audio amplifier (185) and a coder/decoder (‘codec’) (183) of a sound card (174) and provide the digitized speech for recognition to ASR engine (150). Multimodal application (195) then packages the digitized speech in a recognition request message according to a VoIP protocol, and transmits the speech to voice server (151) through the VoIP connection (216) on the network (100).

Voice server application (188) provides voice recognition services for multimodal devices by accepting dialog instructions, VoiceXML segments, and returning speech recognition results, including text representing recognized speech, text for use as variable values in dialogs, and output from execution of semantic interpretation scripts—as well as voice prompts, including vocal help prompts according to embodiments of the present invention. Voice server application (188) includes computer program instructions that provide text-to-speech (‘TTS’) conversion for voice prompts and voice responses to user input in multimodal applications such as, for example, X+V applications, SALT applications, or Java Speech applications.

The voice server application (188) receives speech for recognition from a user and passes the speech through API calls to VoiceXML interpreter (192) which in turn uses an ASR engine (150) for speech recognition. The ASR engine receives digitized speech for recognition, uses frequency components of the digitized speech to derive an SFV, uses the SFV to infer phonemes for the word from the language-specific acoustic model (108), and uses the phonemes to find the speech in the lexicon (106). The ASR engine then compares speech found as words in the lexicon to words in a grammar (104) to determine whether words or phrases in speech are recognized by the ASR engine.

The system of FIG. 3 operates generally to dynamically define a VoiceXML grammar in an X+V page according to embodiments of the present invention by loading the X+V page by the multimodal application, from a web server into the multimodal device for execution, where the X+V page includes one or more VoiceXML grammars in one or more VoiceXML dialogs, including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application a grammar definition for the in-line grammar from the web server without reloading the X+V page; and defining by the multimodal application the in-line grammar with the retrieved grammar definition before executing the VoiceXML dialog containing the in-line grammar.

The system of FIG. 3 operates generally to dynamically define a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention by loading the X+V page (512) by the multimodal application (195), from a web server (147) into the multimodal device (152) for execution, where the X+V page includes one or more VoiceXML grammars (508) in one or more VoiceXML dialogs (510), including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application (195) a grammar definition (513) for the in-line grammar (508) from the web server (147) without reloading the X+V page; and defining by the multimodal application (195) the in-line grammar (508) with the retrieved grammar definition (513) before executing the VoiceXML dialog containing the in-line grammar.

The multimodal application (195) is operatively coupled to a VoiceXML interpreter (192). In this example, the operative coupling between the multimodal application and the VoiceXML interpreter is implemented with a VoIP connection (216) through a voice services module (130). The voice services module is a thin layer of functionality, a module of computer program instructions, that presents an API (316) for use by an application level program in providing dialog instructions and speech for recognition to a VoiceXML interpreter and receiving in response voice prompts and other responses, including vocal help prompts according to embodiments of the present invention.

The voice services module (130) provides data communications services through the VoIP connection and the voice server application (188) between the multimodal device (152) and the VoiceXML interpreter (192). The API (316) is the same API presented to applications by a VoiceXML interpreter when the VoiceXML interpreter is installed on the multimodal device in a thick client architecture (316 on FIG. 4). So from the point of view of an application calling the API (316), the application is calling the VoiceXML interpreter directly. The data communications functions of the voice services module (130) are transparent to applications that call the API (316). At the application level, calls to the API (316) may be issued from the multimodal browser (196), which provides an execution environment for the multimodal application (195) when the multimodal application is implemented with X+V. And calls to the API (316) may be issued from the JVM (101), which provides an execution environment for the multimodal application (195) when the multimodal application is implemented with Java.

Dynamically defining a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention in thick client architectures is generally implemented with multimodal devices, that is, automated computing machinery or computers. In the system of FIG. 1, for example, all the multimodal devices (152) are implemented to some extent at least as computers. For further explanation, therefore, FIG. 4 sets forth a block diagram of automated computing machinery comprising an example of a computer useful as a multimodal device (152) in dynamically defining a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention. In a multimodal device implementing a thick client architecture as illustrated in FIG. 4, the multimodal device (152) has no connection to a remote voice server containing a VoiceXML interpreter and a speech engine. All the components needed for speech synthesis and voice recognition in dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention are installed or embedded in the multimodal device itself.

The example multimodal device (152) of FIG. 4 includes several components that are structured and operate similarly as do parallel components of the voice server, having the same drawing reference numbers, as described above with reference to FIG. 2: at least one computer processor (156), frontside bus (162), RAM (168), high speed memory bus (166), bus adapter (158), video adapter (209), video bus (164), expansion bus (160), communications adapter (167), I/O adapter (178), disk drive adapter (172), an operating system (154), a JVM (102), a VoiceXML Interpreter (192), a speech engine (153), and so on. As in the system of FIG. 4, the speech engine in the multimodal device of FIG. 2 includes an ASR engine (150), a grammar (104), a lexicon (106), a language-dependent acoustic model (108), and a TTS engine (194). The VoiceXML interpreter (192) administers such dialogs by processing the dialog instructions sequentially in accordance with a VoiceXML Form Interpretation Algorithm (‘FIA’) (193).

The speech engine (153) in this kind of embodiment, a thick client architecture, often is implemented as an embedded module in a small form factor device such as a handheld device, a mobile phone, PDA, and the like. An example of an embedded speech engine useful for dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention is IBM's Embedded ViaVoice Enterprise. The example multimodal device of FIG. 4 also includes a sound card (174), which is an example of an I/O adapter specially designed for accepting analog audio signals from a microphone (176) and converting the audio analog signals to digital form for further processing by a codec (183). The sound card (174) is connected to processor (156) through expansion bus (160), bus adapter (158), and front side bus (162).

Also stored in RAM (168) in this example is a multimodal application (195), a module of computer program instructions capable of operating a multimodal device as an apparatus that supports dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention. The multimodal application (195) implements speech recognition by accepting speech for recognition from a user and sending the speech for recognition through API calls to the ASR engine (150). The multimodal application (195) implements speech synthesis generally by sending words to be used as prompts for a user to the TTS engine (194). As an example of thick client architecture, the multimodal application (195) in this example does not send speech for recognition across a network to a voice server for recognition, and the multimodal application (195) in this example does not receive synthesized speech, TTS prompts and responses, across a network from a voice server. All grammar processing, voice recognition, and text to speech conversion in this example is performed in an embedded fashion in the multimodal device (152) itself.

More particularly, multimodal application (195) in this example is a user-level, multimodal, client-side computer program that provides a speech interface through which a user may provide oral speech for recognition through microphone (176), have the speech digitized through an audio amplifier (185) and a coder/decoder (‘codec’) (183) of a sound card (174) and provide the digitized speech for recognition to ASR engine (150). The multimodal application (195) may be implemented as a set or sequence of X+V documents executing in a multimodal browser (196) or microbrowser that passes VoiceXML grammars and digitized speech by calls through an API (316) directly to an embedded VoiceXML interpreter (192) for processing. The embedded VoiceXML interpreter (192) may in turn issue requests for speech recognition through API calls directly to the embedded ASR engine (150). Multimodal application (195) also can provide speech synthesis, TTS conversion, by API calls to the embedded TTS engine (194) for voice prompts and voice responses to user input, including dynamically generated vocal help prompts according to embodiments of the present invention.

In a further class of exemplary embodiments, the multimodal application (195) may be implemented as a Java voice application that executes on Java Virtual Machine (102) and issues calls through the VoiceXML API (316) for speech recognition and speech synthesis services. In further exemplary embodiments, the multimodal application (195) may be implemented as a set or sequence of SALT documents executed on a multimodal browser (196) or microbrowser that issues calls through the VoiceXML API (316) for speech recognition and speech synthesis services. In addition to X+V, SALT, and Java implementations, multimodal application (195) may be implemented in other technologies as will occur to those of skill in the art, and all such implementations are well within the scope of the present invention.

The multimodal device (152) in this example is configured to dynamically define a VoiceXML grammar in an X+V page according to embodiments of the present invention by loading the X+V page (512) by the multimodal application (195), from a web server into the multimodal device for execution, where the X+V page includes one or more VoiceXML grammars (508) in one or more VoiceXML dialogs (510), including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application (195) a grammar definition for the in-line grammar (508) from the web server without reloading the X+V page (512); and defining by the multimodal application the in-line grammar (508) with the retrieved grammar definition before executing the VoiceXML dialog (512) containing the in-line grammar.

The multimodal application (195) is operatively coupled to a VoiceXML interpreter (192). In this example, the operative coupling between the multimodal application and the VoiceXML interpreter is implemented through the VoiceXML interpreter API (316). The VoiceXML interpreter API (316) is a module of computer program instructions for use by an application level program in providing dialog instructions and speech for recognition to a VoiceXML interpreter and receiving in response voice prompts and other responses, including vocal help prompts according to embodiments of the present invention. The VoiceXML interpreter API (316) presents the same application interface as is presented by the API of the voice service module (130 on FIG. 3) in a thin client architecture. At the application level, calls to the API (316) may be issued from the multimodal browser (196), which provides an execution environment for the multimodal application (195) when the multimodal application is implemented with X+V. And calls to the API (316) may be issued from the JVM (101), which provides an execution environment for the multimodal application (195) when the multimodal application is implemented with Java.

The multimodal application (195) in this example, running on a multimodal device (152) that contains its own VoiceXML interpreter (192) and its own speech engine (153) with no network or VoIP connection to a remote voice server containing a remote VoiceXML interpreter or a remote speech engine, is an example of a so-called ‘thick client architecture,’ so-called because all of the functionality for processing voice mode interactions between a user and the multimodal application—as well as all or most of the functionality for dynamically generating vocal help prompts according to embodiments of the present invention—is implemented on the multimodal device itself.

For further explanation, FIG. 5 sets forth a flow chart illustrating an exemplary method of dynamically defining a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention. Dynamically defining a VoiceXML grammar in an X+V page in this example is implemented with a multimodal application (195), composed of at least one X+V page (512). The X+V page (512) includes one or more VoiceXML grammars in one or more VoiceXML dialogs (510), including at least one in-line grammar (508) that is declared but undefined. The multimodal application (195) operates on a multimodal device supporting multiple modes of interaction including a voice mode and one or more non-voice modes of user interaction with the multimodal application. The voice mode is represented in this example with audio output through a speaker (177) and audio input through a microphone (176). Non-voice modes are represented by user input devices (181), a keyboard and a mouse.

The multimodal application is operatively coupled (524) to a VoiceXML interpreter (149). The operative coupling (524) provides a data communications path (504) from the multimodal application to the VoiceXML interpreter for dialogs for interpretation, grammars, speech for recognition, and prompt text for TTS conversion. The operative coupling (524) provides a data communications path (506) from the VoiceXML interpreter to the multimodal application for voice prompts, recognized speech, semantic interpretation results, and other responses. The operative coupling may be an API (316 on FIG. 4) when the multimodal application is implemented in a thick client architecture, and the operative coupling may include an API (316 on FIG. 3), a voice service module (130 on FIG. 3), and a VoIP connection (216 on FIG. 3) when the multimodal application is implemented in a thin client architecture.

The method of FIG. 5 includes loading (500) an X+V page (512) by the multimodal application (195), from a web server into a multimodal device for execution. The multimodal application in this example is a set of one or more X+V pages executing in an operating environment provided by a multimodal browser or microbrowser on a multimodal device. The X+V page (512) is an XHTML document that incorporates VoiceXML dialogs in the form of VoiceXML <form> elements to voice-enable data input of XHTML data input fields—in accordance, for example, with the World Wide Web Consortium standard that is dated 16 Mar. 2004 and entitled “XHTML+Voice Profile 1.2.” The multimodal browser or microbrowser loads the X+V page from the web server (147) by use of a data communications protocol such as HTTP, TCP/IP, or the like.

The method of FIG. 5 also includes detecting (501) by the multimodal application a grammar retrieval generating event (502) prior to retrieving the grammar definition for the undefined in-line grammar. In the method of FIG. 5, the grammar retrieval generating event may be, for example, a match on a word in a grammar in a VoiceXML dialog of the multimodal application or a DOM event. A DOM event may be a DHTML event or an XML Events event, for example. An example of a DOM event is an ONCLICK event in an XHTML <select> element.

The method of FIG. 5 also includes retrieving (514) by the multimodal application (195) a grammar definition (516) for the in-line grammar (508) from the web server (147) without reloading the X+V page (512). In the example of FIG. 5, retrieving (514) of the grammar definition is carried out in response to detecting (501) the grammar retrieval generating event (502)—although strictly speaking, this relationship between the retrieving step and the grammar retrieval generating event, although probably a preferred embodiments, is correctly characterized as optional rather than required. Such grammar retrieval generating event provides asynchronous, dynamic grammar definition, but all undefined grammar could, for example, all be defined by the multimodal application at load time or in other execution conditionalities as will occur to those of skill in the art.

In the method of FIG. 5, retrieving (514) a definition for the in-line grammar from the web server is carried out by retrieving a definition for the in-line grammar from the web server through an XMLHttpRequest interface (520). The XMLHttpRequest interface is an interface exposed in an execution environment such as a multimodal browser that allows scripts in a multimodal application to perform HTTP client functionality, such as submitting for data or loading data from a server. XMLHttpRequest was originally developed by Microsoft but is now a standard supported by the World Wide Web Consortium in, for example, the document entitled, “The XMLHttpRequest Object, W3C Working Draft 27 Sep. 2006.” The name of the interface, ‘XMLHttpRequest,’ is not exactly normative, because XMLHttpRequest objects may retrieve data other than XML and XMLHttpRequest objects may communicate with servers using protocols other than HTTP. The following is an example of a script that can be used to retrieve a grammar definition for an in-line grammar from a web server without reloading the X+V page that contains an undefined grammar:

<script language=“Javascript” type=“text/javascript”>  function xmlHttpPost(URL) {   var xmlHttpRequest = new XMLHttpRequest( );   xmlHttpRequest.open(‘POST’, URL, true);   xmlHttpRequest.setRequestHeader(‘Content-Type’, ‘application/x-    www-form-urlencoded’);   xmlHttpRequest.send(document.fid.in1.value);   xmlHttpRequest.onreadystatechange = function( ) {    if (xmlHttpReq.readyState == 4) {     updatepage(xmlHttpRequest.responseText);    }   }  }  function updatepage(newGrammarDefinition){   formname.GetElementById(“in2-grammar”).innerVXML =    newGrammarDefinition;   formname.GetElementById(“in2”).focus = true;  } </script>

This example script, xmlHttpPost( ), when called, instantiates a new XMLHttpRequest object and opens a new XMLHttpRequest request with:

-   -   xmlHttpRequest.open(‘POST’, URL, true);

Then the script adds a label/value pair to the HTTP header to be sent to the server identified by URL and sends a request to the server at the URL with:

-   -   xmlHttpRequest.send(document.fid.in1.value);

Document.fid.in1.value is the value of a DOM field representing the value of an XHTML data input field named “n1” in a an XHTML form named “fid.” The value of document.fid.in1.value is a DOM object value sent to the server a call parameter or query representing is a word or phrase from a previously-matched VoiceXML grammar, a word or phrase from keyboard input to a XHTML input field, or a value generated by some other previous data entry as may occur to those of skill in the art.

The method of FIG. 5 also includes defining (518) by the multimodal application the in-line grammar (508) with the retrieved grammar definition (516) before executing the VoiceXML dialog containing the in-line grammar. Continuing the explanation with the example script set forth above: On the next state change of the XMLHttpRequest object, the object executes the function:

function( ) {  if (self.xmlHttpReq.readyState == 4) {   updatepage(xmlHttpRequest.responseText);  } to define an undefined in-line grammar with the retrieved grammar definition by updating the X+V page with the new grammar definition that is now stored in xmlHttpRequest.responseText. The updatepage( ) function takes the new grammar definition retrieved through the xmlHttpRequest.send( ) call and stores it as the innerVXML value a DOM object representing a previously undefined in-line VoiceXML grammar named “in2-grammar” that is used to voice-enable an XHTML data input field named “in2” with:

formname.GetElementById(“in2-grammar”).innerVXML =  newGrammarDefinition;

Then the updatepage( ) function changes focus to the field named “in2” with:

-   -   formname.GetElementById(“in2”).focus=true;

Now that the previously undefined grammar “in2-grammar” is defined, it can be used to voice-enable the XHTML data entry field “in2.” The multimodal application can execute the VoiceXML dialog (510) containing the in-line grammar (508)—which is now defined—by providing the now-defined grammar to a VoiceXML interpreter (149) for execution.

For further explanation, FIG. 6 sets forth a flow chart illustrating a further exemplary method of dynamically defining a VoiceXML grammar in an X+V page of a multimodal application according to embodiments of the present invention that also includes executing (503) by the multimodal device a VoiceXML dialog (528) of the X+V page (512), including matching a word in a voice recognition grammar of the executed VoiceXML dialog and filling, with the matched word, a data entry field of the X+V page. The method of FIG. 6 also includes selecting, in dependence upon the matched word (505), a grammar definition for an in-line grammar that is declared but undefined. Such selecting of a grammar definition means that, in this example, retrieving (514) a grammar definition for the in-line grammar from the web server is carried out by retrieving the selected grammar definition (535); and defining the in-line grammar with the retrieved grammar definition is carried out by defining the in-line grammar with the selected grammar definition before executing the VoiceXML dialog containing the in-line grammar.

Dynamically defining a VoiceXML grammar in an X+V page according to the method of FIG. 6 is further explained with reference to the following example X+V page:

<html xmlns=“http://www.w3.org/1999/xhtml”  xmlns:vxml=“http://www.w3.org/2001/vxml”  xmlns:ev=“http://www.w3.org/2001/xml-events”  xmlns:xv=“http://www.voicexml.org/2002/xhtml+voice”> <head>   <script language=“Javascript” type=“text/javascript” >    function xmlHttpPost(URL) {     var xmlHttpRequest = new XMLHttpRequest( );     xmlHttpRequest.open(‘POST’, URL, true);     xmlHttpRequest.setRequestHeader(‘Content-Type’,      ‘application/x-www-form-urlencoded’);     self.xmlHttpReq.send(null);     xmlHttpRequest.onreadystatechange = function( ) {      if (self.xmlHttpReq.readyState == 4) {      updatepage(self.xmlHttpRequest.responseText);     }    }   }   function updatepage(newGrammarDefinition){    formname.GetElementById(“city-grammar”).innerVXML =     newGrammarDefinition;    formname.GetElementById(“city”).focus = true;   } </script> <script type=“text/javascript” declare=“declare” id=“jsPost”>   xmlHttpPost( “http://server.com/city-grammar?state=” +    document.GetElementById(‘state’).value); </script> <vxml:form id=“stateform”>  <vxml:field name=“vstate”>   <vxml:prompt src=“#p1” />   <vxml:grammar src=“state.grxml” type=“application/srgs+xml”/>   <vxml:filled>   <vxml:assign name=“document.fid.state.value” expr=“vstate”/>   <vxml:throw event=“loadcities”/>   </vxml:filled>   </vxml:field> </vxml:form> <vxml:form id=cityform”>  <vxml:field name=“vcity”>   <vxml:prompt>    In what city do you live in <vxml:value expr=“state”/>?   </vxml:prompt>   <vxml:grammar id=“city-grammar”>   </vxml:grammar>   <vxml:filled>     <vxml:assign name=“document.fid.city.value” expr=“vcity”/>    </vxml:filled>   </vxml:field>  </vxml:form>  <ev:listener ev:observer=“stateform” ev:event=“loadcities”      ev:handler=“#jsPost”)/> </head> <body> <h2 id=“p1” class=“server”>What state do you live in?</h2>  <form name=“fid” action=“ctmn0-style.mxml”>      <table> <tbody> <tr>       <td>State:</td>       <td> <input type=“text” id=“state” name=“state”        ev:event=“focus” ev:handler=“stateform”/> </td>       <td>City:</td>       <td> <input type=“text” id=“city” name=“city”        ev:event=“focus” ev:handler=“cityform”/> </td> </tr>        </tbody>      </table>  </form> </body> </html>

In this example X+V page, a VoiceXML dialog, implemented as a VoiceXML <form> element identified as id=“stateform,” voice-enables an XHTML data entry field named “state,” and a VoiceXML dialog, implemented as a VoiceXML <form> element identified as id=“cityform,” voice-enables an XHTML data entry field named “city.” Stateform contains a defined external grammar:

<vxml:grammar src=“state.grxml” type=“application/srgs+xml”/> <vxml:filled>

Cityform, however, contains an in-line grammar that is declared but undefined:

<vxml:grammar id=“city-grammar”> </vxml:grammar>

Cityform needs to be defined before it can be used for speech recognition, and this is done as follows.

A multimodal device executes the stateform VoiceXML dialog of the X+V page by providing the stateform VoiceXML dialog to a VoiceXML interpreter (149 on FIG. 6): through an API (316 on FIG. 4) in a thick client architecture, through an API, a voice services module, and a VoIP connection (315, 130, 216 on FIG. 3) in a thin client architecture. In executing the stateform VoiceXML dialog, the VoiceXML interpreter prompts a user for speech input, matches a word in a voice recognition grammar of the executed VoiceXML dialog, and fills, with the matched word, a data entry field of the X+V page. In this example, the prompt is “What state do you live In?”, and user speech matches a state from the grammar for stateform, such as, for example, “Texas,” “Oklahoma,” or “California.” Then stateform's<filled> field:

<vxml:filled>  <vxml:assign name=“document.fid.state.value” expr=“vstate”/>  <vxml:throw event=“loadcities”/> </vxml:filled> fills, with the matched word, a data entry field of the X+V page by assigning the matched word to a DOM variable representing the name of a state and throws the XML Events event “loadcities,” which is caught by the event listener:

<ev:listener ev:observer=“stateform” ev:event=“loadcities”  ev:handler=“#jsPost”)/>

The event listener calls the event handler, the script identified as “#jsPost”:

<script type=“text/javascript” declare=“declare” id=“jsPost”>  xmlHttpPost( “http://server.com/city-grammar?state=” +   document.GetElementById(‘state’).value); </script>

The web server (147 on FIG. 6) stores a number of grammar definitions (513) for use in dynamically defining a VoiceXML grammar in an X+V page according to embodiments of the present invention. The jsPost script builds a URL that includes a query string containing the name of the matched state and passes the URL as a call parameter in a call to the script function xmlHttpPost(URL) to identify the selected grammar to the web server.

The XMLHttpRequest interface (520 on FIG. 6) is used to identify the selected grammar definition to the web server. XmlHttpPost( ), when called, instantiates a new XMLHttpRequest object, opens a new XMLHttpRequest request, adds a label/value pair to the HTTP header to be sent to the server identified by URL, and sends a request to the server at the URL with:

-   -   xmlHttpRequest.send(null);         In this example, the parameter of the send( ) is null because         there is no need for the send( ) to include the matched word;         the matched word is already encoded into the URL as a query         string—identifying the selected grammar definition to the web         server. The web server returns the selected grammar definition,         and the xmlHttpRequest object stores the selected grammar         definition in xmlHttpRequest.responseText. On the next state         change of the xmlHttpRequest object, the xmlHttpRequest object         defines the in-line grammar with the selected grammar definition         by executing the function:

function( ) {  if (self.xmlHttpReq.readyState == 4) {   updatepage(xmlHttpRequest.responseText);  }

This function defines an undefined in-line grammar with the retrieved, selected grammar definition by updating the X+V page with the new grammar definition that is now stored in xmlHttpRequest.responseText. The updatepage( ) function takes the new grammar definition retrieved through the xmlHttpRequest.send( ) call and stores it as the innerVXML value a DOM object representing the previously undefined in-line grammar named “city-grammar” with:

formname.GetElementById(“city-grammar”).innerVXML =  newGrammarDefinition;

Then the updatepage( ) function changes focus to the XHTML field named “city” with:

-   -   formname.GetElementById(“city”).focus=true;         Now that the previously undefined grammar “city-grammar” is         defined, it can be used to voice-enable the XHTML data entry         field “city.” The multimodal application can execute the         VoiceXML dialog (510) containing the in-line grammar (508)—which         is now defined—by providing the now-defined grammar to a         VoiceXML interpreter (149) for execution. In this example, the         VoiceXML dialog containing the in-line grammar—which is now         defined—is identified as id=“cityform.”

Although XMLHttpRequest is described in this specification, in effect, as a preferred method of retrieving a definition for an in-line grammar from a web server without reloading the X+V page containing the in-line grammar, XMLHttpRequest is not the only method of retrieving a definition for an in-line grammar from a web server without reloading the X+V page containing the in-line grammar. Examples of other methods to achieve a similar effect of dynamically defining a VoiceXML grammar in an X+V page of a multimodal application using scripting languages and/or plugin technology include invisible inline frames, Netscape's LiveConnect™, Microsoft's ActiveX™, Microsoft's XML Data Islands™, Macromedia Flash Player™, and Java Applets. In addition, the World Wide Web Consortium has several Recommendations that also allow for dynamic communication between a server and user agent, including the object element defined in HTML 4 for embedding arbitrary content types into documents, (replaces inline frames under XHTML 1.1), and the Document Object Model (DOM) Level 3 Load and Save Specification.

Exemplary embodiments of the present invention are described largely in the context of a fully functional computer system for dynamically defining a VoiceXML grammar in an X+V page. Readers of skill in the art will recognize, however, that the present invention also may be embodied in a computer program product disposed on signal bearing media for use with any suitable data processing system. Such signal bearing media may be transmission media or recordable media for machine-readable information, including magnetic media, optical media, or other suitable media. Examples of recordable media include magnetic disks in hard drives or diskettes, compact disks for optical drives, magnetic tape, and others as will occur to those of skill in the art. Examples of transmission media include telephone networks for voice communications and digital data communications networks such as, for example, Ethernets™ and networks that communicate with the Internet Protocol and the World Wide Web. Persons skilled in the art will immediately recognize that any computer system having suitable programming means will be capable of executing the steps of the method of the invention as embodied in a program product. Persons skilled in the art will recognize immediately that, although some of the exemplary embodiments described in this specification are oriented to software installed and executing on computer hardware, nevertheless, alternative embodiments implemented as firmware or as hardware are well within the scope of the present invention.

It will be understood from the foregoing description that modifications and changes may be made in various embodiments of the present invention without departing from its true spirit. The descriptions in this specification are for purposes of illustration only and are not to be construed in a limiting sense. The scope of the present invention is limited only by the language of the following claims. 

1. A method of dynamically defining a VoiceXML grammar in an X+V page of a multimodal application, the method implemented with the multimodal application operating on a multimodal device supporting multiple modes of interaction including a voice mode and one or more non-voice modes, the multimodal application operatively coupled to a VoiceXML interpreter, the method comprising: loading the X+V page by the multimodal application, from a web server into the multimodal device for execution, the X+V page including one or more VoiceXML grammars in one or more VoiceXML dialogs, including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application a grammar definition for the in-line grammar from the web server without reloading the X+V page; and defining by the multimodal application the in-line grammar with the retrieved grammar definition before executing the VoiceXML dialog containing the in-line grammar.
 2. The method of claim 1 wherein retrieving a definition for the in-line grammar from the web server further comprises retrieving a definition for the in-line grammar from the web server through an XmlHttpRequest interface.
 3. The method of claim 1 further comprising detecting by the multimodal application a grammar retrieval generating event prior to retrieving the grammar definition, wherein the retrieving of the grammar definition is carried out in response to the detecting of the grammar retrieval generating event.
 4. The method of claim 2 wherein the grammar retrieval generating event is a match on a word in a grammar in a VoiceXML dialog of the multimodal application.
 5. The method of claim 2 wherein the grammar retrieval generating event is a DOM event.
 6. The method of claim 1 further comprising: executing by the multimodal device a VoiceXML dialog of the X+V page, including matching a word in a voice recognition grammar of the executed VoiceXML dialog and filling, with the matched word, a data entry field of the X+V page; and selecting, in dependence upon the matched word, a grammar definition for an in-line grammar that is declared but undefined; wherein: retrieving a grammar definition for the in-line grammar further comprises retrieving the selected grammar definition; and defining the in-line grammar with the retrieved grammar definition further comprises defining the in-line grammar with the selected grammar definition before executing the VoiceXML dialog containing the in-line grammar.
 7. Apparatus for dynamically defining a VoiceXML grammar in an X+V page of a multimodal application, the apparatus implemented with the multimodal application operating on a multimodal device supporting multiple modes of interaction including a voice mode and one or more non-voice modes, the multimodal application operatively coupled to a VoiceXML interpreter, the apparatus comprising a computer processor and a computer memory operatively coupled to the computer processor, the computer memory having disposed within it computer program instructions capable of: loading the X+V page by the multimodal application, from a web server into the multimodal device for execution, the X+V page including one or more VoiceXML grammars in one or more VoiceXML dialogs, including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application a grammar definition for the in-line grammar from the web server without reloading the X+V page; and defining by the multimodal application the in-line grammar with the retrieved grammar definition before executing the VoiceXML dialog containing the in-line grammar.
 8. The apparatus of claim 7 wherein retrieving a definition for the in-line grammar from the web server further comprises retrieving a definition for the in-line grammar from the web server through an XmlHttpRequest interface.
 9. The apparatus of claim 7 further comprising computer program instructions capable of detecting by the multimodal application a grammar retrieval generating event prior to retrieving the grammar definition, wherein the retrieving of the grammar definition is carried out in response to the detecting of the grammar retrieval generating event.
 10. The apparatus of claim 9 wherein the grammar retrieval generating event is a match on a word in a grammar in a VoiceXML dialog of the multimodal application.
 11. The apparatus of claim 9 wherein the grammar retrieval generating event is a DOM event.
 12. The apparatus of claim 7 further comprising computer program instructions capable of: executing by the multimodal device a VoiceXML dialog of the X+V page, including matching a word in a voice recognition grammar of the executed VoiceXML dialog and filling, with the matched word, a data entry field of the X+V page; and selecting, in dependence upon the matched word, a grammar definition for an in-line grammar that is declared but undefined; wherein: retrieving a grammar definition for the in-line grammar further comprises retrieving the selected grammar definition; and defining the in-line grammar with the retrieved grammar definition further comprises defining the in-line grammar with the selected gramar definition before executing the VoiceXML dialog containing the in-line grammar.
 13. A computer program product for dynamically defining a VoiceXML grammar in an X+V page of a multimodal application, the computer program product comprising a multimodal application capable of operating on a multimodal device supporting multiple modes of interaction including a voice mode and one or more non-voice modes, the multimodal application capable of operatively coupling to a VoiceXML interpreter, the computer program product disposed upon a computer-readable signal bearing medium, the computer program product comprising computer program instructions capable of: loading the X+V page by the multimodal application, from a web server into the multimodal device for execution, the X+V page including one or more VoiceXML grammars in one or more VoiceXML dialogs, including at least one in-line grammar that is declared but undefined; retrieving by the multimodal application a grammar definition for the in-line grammar from the web server without reloading the X+V page; and defining by the multimodal application the in-line grammar with the retrieved grammar definition before executing the VoiceXML dialog containing the in-line grammar.
 14. The computer program product of claim 13 wherein the signal bearing medium comprises a recordable medium.
 15. The computer program product of claim 13 wherein the signal bearing medium comprises a transmission medium.
 16. The computer program product of claim 13 wherein retrieving a definition for the in-line grammar from the web server further comprises retrieving a definition for the in-line grammar from the web server through an XmlHttpRequest interface.
 17. The computer program product of claim 13 further comprising computer program instructions capable of detecting by the multimodal application a grammar retrieval generating event prior to retrieving the grammar definition, wherein the retrieving of the grammar definition is carried out in response to the detecting of the grammar retrieval generating event.
 18. The computer program product of claim 17 wherein the grammar retrieval generating event is a match on a word in a grammar in a VoiceXML dialog of the multimodal application.
 19. The computer program product of claim 17 wherein the grammar retrieval generating event is a DOM event.
 20. The computer program product of claim 13 further comprising computer program instructions capable of: executing by the multimodal device a VoiceXML dialog of the X+V page, including matching a word in a voice recognition grammar of the executed VoiceXML dialog and filling, with the matched word, a data entry field of the X+V page; and selecting, in dependence upon the matched word, a grammar definition for an in-line grammar that is declared but undefined; wherein: retrieving a grammar definition for the in-line grammar further comprises retrieving the selected grammar definition; and defining the in-line grammar with the retrieved grammar definition further comprises defining the in-line grammar with the selected gramar definition before executing the VoiceXML dialog containing the in-line grammar. 